package client.net.handler;

import client.Client;
import java.nio.ByteBuffer;
import shared.util.PacketIO;

/**
 * Handles messages to the client telling it that it has been invited to a game.
 * 
 * @author Vincent Tsuei
 * @version 2012-11-29
 */
public class GameInviteHandler implements ClientPacketHandler {

    @Override
    public int processPacket(Client client, ByteBuffer packet) {
        String from = PacketIO.readString(packet);
        client.getUserIO().write("", true);
        client.getUserIO().write("You have been invited to a game by " + from, true);
        return 0;
    }
    
}
